package com.gljx.web.dao;

import com.gljx.web.Entity.BigCarData;
import com.gljx.web.Entity.JournalEntry.AdmissionNumberSummaryJournal;
import com.gljx.web.Entity.JournalEntry.DepDayCompleteJournal;
import com.gljx.web.Entity.JournalEntry.DepDayCompleteJournal2;
import com.gljx.web.Entity.JournalEntry.StudentStateJournal;
import com.gljx.web.Entity.Student;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.util.List;
import java.util.Map;

@Component
public interface StudentMapper {
    int deleteByPrimaryKey(String fid);

    int insert(Student record);

    int insertSelective(Student record);

    Student selectByPrimaryKey(String fid);

    int updateByPrimaryKeySelective(Student record);

    int updateByPrimaryKey(Student record);

    void insertStudent(Student student);

    Student selectStudentById(String fid);

    /*AND sh1.CFSUBJECT = #{kemu}*/
    List<Student> selectStudentByIdAsCflcsjidAndKemu(@Param("fid") String fid,
                                                     @Param("cflcsjid") String cflcsjid,
                                                     @Param("kemu") String kemu);

    //void updateStudent(String fid);

    int updateStudent(Student student);

    void deteleStudentByFid(String[] fid);

    List<Student> selectStudentByCfidcardno(@Param("cfidcardno") String cfidcardno);

    /**
     * 考试预约导入查询
     * @author zyq.
     * @param map
     * @return
     */
    List<Student> selectStudentByCfidcardnos(Map map);

    List<Student> selectStudentByFid(String fid);

    List<Student> selectStudentByFidTiming(String fid);

    Student selectStudentByCardidAndName(@Param("studentCardId") String studentCardId,@Param("name")String name);

    List<Student> selectStudentByPsql(String psql);

    /**
     * 微信通过订单号查询学生
     * @param psql
     * @return
     * @author LiXiang  @date 2018年1月10日 上午10:52:43
     */
    Student selectStudentByDDNO(@Param("ddno")String ddno);

    //查询已经报名的人数
    List<StudentStateJournal> selectEnrol(Map map);

    //部门日招生完成情况统计表
    List<DepDayCompleteJournal> selectDepAdmissions(Map map);

    //查询本年累计
    List<DepDayCompleteJournal> selectDepAdmissionsAsYears(Map map);

    //个人月度招生完成情况统计表（对推荐人）
    List<DepDayCompleteJournal2> selectDepAdmissionsAsYears2(Map map);

    //个人月度招生完成情况统计表（不对推荐人）
    List<DepDayCompleteJournal2> selectDepAdmissionsAsYears3(Map map);

    //查询各个车型的招生人数 每日分组
    List<AdmissionNumberSummaryJournal> selectSummartDayAsTypeAsDay(Map map);

    //查询二部三部的c1 日
    List<AdmissionNumberSummaryJournal> selectSummartDayAsTypeTwoAndThreeAsDay(Map map);

    //查询各个车型的招生人数 每月
    List<AdmissionNumberSummaryJournal> selectSummartDayAsTypeAsMonth(Map map);

    //查询二部三部的c1 月
    List<AdmissionNumberSummaryJournal> selectSummartDayAsTypeTwoAndThreeAsMonth(Map map);

    //查询指定日期之前的各个类型报名人数
    List<AdmissionNumberSummaryJournal> selectSummartDayAsTypeAsLastMonth(Map map);

    //查询到这个日期位置二部三部的c1
    List<AdmissionNumberSummaryJournal> selectSummartDayAsTypeTwoAndThreeAsLastMonth(Map map);

    List<BigCarData> selectBigCarData();

    Student selectStudentByIdCardNo(Map map);

    Student selectStudentByIdCardNoWx(String cerno);

    List<Student> selectTimingStudent(Student student);

    /**
     * 根据身份证和车型查找学员信息  用于考试成绩导入
     * @param idCard
     * @param carType
     * @return
     */
    List<Student> selStudentMesgByIdcardAndCarType(@Param("idCard") String idCard,@Param("carType") String carType,@Param("companyId") String companyId);

    //查询
    List<Student> selectStudentByIdAsyjj(@Param("fid") String fid, @Param("cfbilltype") String cfbilltype);

    Student selStudentMaesByStudentIdCard(@Param("cfidcardno")String cfidcardno);
}